package com.usefullc.extinguisher.enums;


import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 设备检查记录状态
 */
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DeviceAuditRecordStatusEnum {

    NOT_AUDIT(0, "未检查"),
    AUDITED(1, "已检查，正常"),
    ERROR(2, "已检查，异常"),
//    MISS_AUDIT(3, "漏审核"),



    ;


    private int code;
    private String value;

    DeviceAuditRecordStatusEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }



    public static DeviceAuditRecordStatusEnum getByCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (DeviceAuditRecordStatusEnum s : DeviceAuditRecordStatusEnum.values()) {
            if (s.getCode() == code) {
                return s;
            }
        }
        return null;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {


        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

}
